import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login'//登录
import Index from '@/components/index'//用户列表
import Systematic from '@/components/systematic'//系统通知管理
import Feedback from '@/components/feedback' //意见反馈
import Contact from '@/components/contact'//联系方式
import PartTimeJob from '@/components/partTimeJob'//栏目 兼职管理


import NotFound from '@/components/404'

import Axios from 'axios'
Axios.defaults.baseURL = 'http://ttjz100.com/'
Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
Vue.prototype.$ajax = Axios



Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: {
        name: 'login'
      }
    },
    {
      path: '/index',
      name: 'index',
      component: Index
    },
    {
      path: '/feedback',
      name: 'feedback',
      component: Feedback
    },
    {
      path: '/contact',
      name: 'contact',
      component: Contact
    },
    {
      path: '/partTimeJob',
      name: 'partTimeJob',
      component: PartTimeJob
    },
    {
      path: '/systematic',
      name: 'systematic',
      component: Systematic
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path:'*',
      name:'404',
      component:NotFound,
    }
  ]
})
